﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="LegajoRegistrar.aspx.cs" Inherits="SOA_RegistroSOA_LegajoRegistrar" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <script type="text/javascript">
        if (window.dialogArguments) {
            window.opener = window.dialogArguments;
        }
    </script>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>

<div id="contenedor800">
    <table border = "0" cellpadding = "0" cellspacing = "0" style="width:100%">
        <tr>
            <td>
                <asp:Label ID="Label1" runat="server" Text=":: Registro del Legajo de la Sociedad"  SkinID="labelsubTituloSkin"></asp:Label>            
            </td>
        </tr>
        <tr>
            <td style="height:10px"><hr id="separador1" /></td>
        </tr>
    </table>


    <table border = "0" cellpadding = "0" cellspacing = "0" style="width:100%">
        <tr>
            <td>
              <table border = "0" cellpadding = "2" cellspacing = "0" style="width:800px">
               <tr>
                <td>

                <asp:Panel ID="Panel6" runat="server" SkinID="panelSkin">
               
                <table border = "0" cellpadding = "2" cellspacing = "0" style="width:100%">
                    <tr><td  style="height:5px" colspan="7"></td>
                    </tr>
                    <tr>
                        <td style="width:10px"></td>
                        <td style="width:60px">
                            <asp:Label ID="Label2" runat="server" Text="Código" SkinID="labelTextSkin"></asp:Label>
                        </td>
                        <td style="width:10px"></td>
                        <td style="width:100px">
                            <asp:Label ID="Label3" runat="server" Text="RUC" SkinID="labelTextSkin"></asp:Label>
                        </td>
                        <td style="width:10px"></td>
                        <td style="width:400px">
                            <asp:Label ID="Label4" runat="server" Text="Razón Social" 
                                SkinID="labelTextSkin"></asp:Label>
                        </td>
                        <td style="width:60px"></td>
                    </tr>
                    <tr>
                        <td style="width:10px"></td>
                        <td style="width:60px">
                            <asp:TextBox ID="txtCodSociedad" Width="50px" runat="server" 
                                SkinID="CajaTextoBloqueadoSkin" ReadOnly="True"></asp:TextBox>
                        </td>
                        <td style="width:10px"></td>
                        <td style="width:100px">
                            <asp:TextBox ID="txtRUCSociedad" Width="80px" runat="server" 
                                SkinID="CajaTextoBloqueadoSkin" ReadOnly="True"></asp:TextBox>
                        </td>
                        <td style="width:10px"></td>
                        <td style="width:400px">
                            <asp:TextBox ID="txtDescSociedad" Width="390px" runat="server" 
                                SkinID="CajaTextoBloqueadoSkin" ReadOnly="True" MaxLength="60"></asp:TextBox>
                        </td>
                        <td ></td>
                    </tr>
                    <tr><td  style="height:5px" colspan="7"></td>
                    </tr>
                </table>   
                </asp:Panel>  
                </td>
                <td style ="width:60px;" align="center">
                            <asp:Image ID="Image3" 
                                ImageUrl="../../UtilHandler/MedirRegistro_ImagePie_Handler.ashx?id=35" 
                                runat="server" ToolTip="Porcentaje de Registro de Legajo completado" />
                </td>
               </tr>                           
              </table>
            </td>
        </tr>
        <tr>
            <td style="height:5px"></td>
        </tr>
        <tr>
            <td>
                
                <asp:TabContainer ID="tabSociedad" runat="server" ActiveTabIndex="2">
                    <!-- TAB 1 -->
                    <asp:TabPanel runat="server" HeaderText="TabPanel1" ID="TabDatGeneral">
                        <HeaderTemplate>                         
                            <asp:Label ID="Label24" runat="server" Text="Datos Generales" SkinID="labelTituloTAB" ></asp:Label>
                         </HeaderTemplate>
                         <ContentTemplate>

                            <asp:Label ID="Label25" runat="server" Text="Domicilio Legal" SkinID="labelTituloPANEL"></asp:Label>
                            <asp:Panel ID="Panel1" runat="server" SkinID="panelSkin" >
                            <table border = "0" cellpadding = "2" cellspacing = "2" style="width:100%"><tr><td style="height:5px" colspan="10"></td></tr><tr><td style="width:80px">
                            <asp:Label ID="Label5" runat="server" Text="Dirección" SkinID="labelTextSkin"></asp:Label></td><td  style="width:580px" colspan="8">
                                <asp:DropDownList ID="ddlTipoDireccion" runat="server" Width="100px" 
                                                SkinID="DropDownListTextSkin"></asp:DropDownList>
                                     <asp:TextBox ID="txtDireccion" runat="server" Width="480px" 
                                                SkinID="CajaTextoSkin" MaxLength="120"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                    ErrorMessage="Ingresar dirección." ControlToValidate="txtDireccion" SkinID="RequiredFieldError" 
                                    >*</asp:RequiredFieldValidator>
                            </td><td></td></tr><tr><td style="width:80px"><asp:Label ID="Label6" runat="server" Text="Departamento" 
                                                SkinID="labelTextSkin"></asp:Label></td><td style="width:120px" colspan="2">
                                <asp:DropDownList ID="ddlDepartamento" runat="server" Width="120px" 
                                                SkinID="DropDownListTextSkin" AutoPostBack="True" 
                                    onselectedindexchanged="ddlDepartamento_SelectedIndexChanged"></asp:DropDownList>
                                     <asp:CustomValidator ID="CustomValidator1" runat="server" 
                                         ClientValidationFunction="SelectValidate" ControlToValidate="ddlDepartamento" 
                                         ErrorMessage="Seleccione el Departamento para el Domicilio">*</asp:CustomValidator>
                                 </td><td style="width:20px"></td><td style="width:60px"><asp:Label ID="Label7" runat="server" Text="Provincia" SkinID="labelTextSkin"></asp:Label></td><td  style="width:140px">
                            <asp:DropDownList ID="ddlProvincia" runat="server" Width="120px" 
                                                SkinID="DropDownListTextSkin" AutoPostBack="True" 
                                onselectedindexchanged="ddlProvincia_SelectedIndexChanged"></asp:DropDownList></td><td  style="width:20px"></td><td  style="width:60px"><asp:Label ID="Label8" runat="server" Text="Distrito" SkinID="labelTextSkin"></asp:Label></td><td  style="width:140px"><asp:DropDownList ID="ddlDistrito" runat="server" Width="120px" 
                                                SkinID="DropDownListTextSkin"></asp:DropDownList></td><td></td></tr><tr><td style="height:5px" colspan="10"></td></tr></table>
                             </asp:Panel>
                             <asp:Panel ID="Panel3" runat="server" height="5px"></asp:Panel>
                                <asp:Label ID="Label26" runat="server" Text="Constitución de Empresa" SkinID="labelTituloPANEL"></asp:Label>
                                <asp:Panel ID="Panel2" runat="server"  SkinID="panelSkin">
                                   <table border = "0" cellpadding = "2" cellspacing = "2" style="width:100%">
                                      <tr><td style="height:5px" colspan="9"></td></tr><tr><td style="width:80px"><asp:Label ID="Label9" runat="server" Text="Departamento" 
                                                SkinID="labelTextSkin"></asp:Label></td><td style="width:120px" >
                                             <asp:DropDownList ID="ddlDepartamentoCons" runat="server" 
                                                SkinID="DropDownListTextSkin" Width="120px" 
                                    AutoPostBack="True" 
                                    onselectedindexchanged="ddlDepartamentoCons_SelectedIndexChanged"></asp:DropDownList></td><td style="width:30px" ></td><td style="width:90px" ><asp:Label ID="Label10" runat="server" Text="Provincia" SkinID="labelTextSkin"></asp:Label></td><td style="width:120px" >
                            <asp:DropDownList ID="ddlProvinciaCons" runat="server" 
                                                SkinID="DropDownListTextSkin" Width="120px" 
                                AutoPostBack="True"></asp:DropDownList></td><td style="width:30px" ></td><td style="width:80px" ><asp:Label ID="Label11" runat="server" Text="Capital Social" 
                                                SkinID="labelTextSkin"></asp:Label></td><td><asp:TextBox ID="txtCapitalSocial" runat="server" SkinID="CajaTextoSkin"></asp:TextBox>
                                     <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                                         ControlToValidate="txtAutovaluo" 
                                         ErrorMessage="Ingrese un Monto Válido para el Capital Social" 
                                         SkinID="RegularExpresionError" 
                                         ValidationExpression="^\d{0,7}(\.\d{1,2})?$">*</asp:RegularExpressionValidator>
                                 </td><td></td></tr><tr><td><asp:Label ID="Label12" runat="server" Text="Nro. de Ficha" 
                                                SkinID="labelTextSkin"></asp:Label></td><td>
                                     <asp:TextBox ID="txtNroFicha" runat="server" SkinID="CajaTextoSkin" 
                                                Width="100px" MaxLength="15"></asp:TextBox>
                                     <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                         ControlToValidate="txtNroFicha" ErrorMessage="Ingrese el Número de Ficha" 
                                         SkinID="RequiredFieldError">*</asp:RequiredFieldValidator>
                                 </td><td></td><td><asp:Label ID="Label13" runat="server" Text="Fecha Inscripción" 
                                                SkinID="labelTextSkin"></asp:Label></td><td><asp:TextBox ID="txtFecIns" runat="server" TargetControlID="txtFecIns" 
                                                SkinID="CajaTextoSkin" Width="70px" ReadOnly="True"></asp:TextBox>
                                                <asp:ImageButton ID="imbFecIns" runat="server" ImageUrl="~/imagenes/btn_calendario_sem.png" Width="16px" />
                                                <asp:CalendarExtender ID="CalendarExtender1" runat="server" Enabled="True" 
                                                PopupButtonID="imbFecIns" TargetControlID="txtFecIns"></asp:CalendarExtender>
                                             <asp:MaskedEditExtender ID="MaskedEditExtender1" runat="server" 
                                         TargetControlID="txtFecIns" Mask="99/99/9999" MaskType="Date" 
                                         CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                                         CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                                         CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" >
                                             </asp:MaskedEditExtender>
                                     <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                                         ControlToValidate="txtFecIns" 
                                         ErrorMessage="Ingrese una Fecha de Inscripción válida" 
                                         SkinID="RegularExpresionError" 
                                         ValidationExpression="([1-9]|0[1-9]|[12][0-9]|3[01])[- /.]([1-9]|0[1-9]|1[012])[- /.][0-9]{4}$">*</asp:RegularExpressionValidator>
                                 </td><td></td><td><asp:Label ID="Label14" runat="server" Text="Fecha Inicio Op." 
                                                SkinID="labelTextSkin"></asp:Label></td><td><asp:TextBox ID="txtFecIniOpe" runat="server" SkinID="CajaTextoSkin" 
                                                Width="70px" ReadOnly="True"></asp:TextBox>
                                             <asp:ImageButton ID="imbFecIniOpe" runat="server" ImageUrl="~/imagenes/btn_calendario_sem.png" Width="16px" /><asp:CalendarExtender ID="CalendarExtender2" runat="server" Enabled="True" 
                                                PopupButtonID="imbFecIniOpe" TargetControlID="txtFecIniOpe"></asp:CalendarExtender>
                                             <asp:MaskedEditExtender ID="MaskedEditExtender2" runat="server" 
                                         TargetControlID="txtFecIniOpe" Mask="99/99/9999" MaskType="Date" 
                                         CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                                         CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                                         CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True">
                                             </asp:MaskedEditExtender>
                                     <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" 
                                         ControlToValidate="txtFecIniOpe" 
                                         ErrorMessage="Ingrese una Fecha de Inicio de Operación válida" 
                                         SkinID="RegularExpresionError" 
                                         ValidationExpression="([1-9]|0[1-9]|[12][0-9]|3[01])[- /.]([1-9]|0[1-9]|1[012])[- /.][0-9]{4}$">*</asp:RegularExpressionValidator>
                                 </td><td></td></tr><tr><td style="height:5px" colspan="9"></td></tr></table></asp:Panel><asp:Panel ID="Panel5" runat="server" height="5px"></asp:Panel><asp:Label ID="Label27" runat="server" Text="Otros Datos" 
                                SkinID="labelTituloPANEL"></asp:Label><asp:Panel ID="Panel4" runat="server"  SkinID="panelSkin"><table border = "0" cellpadding = "2" cellspacing = "2" style="width:100%"><tr><td style="height:5px" colspan="9"></td></tr><tr><td style="width:80px"><asp:Label ID="Label15" runat="server" Text="Email" SkinID="labelTextSkin"></asp:Label></td><td  style="width:200px">
                                 <asp:TextBox ID="txtEmail" runat="server" SkinID="CajaTextoSkin" Width="200px" 
                                     MaxLength="60"></asp:TextBox>
                                 <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                     ControlToValidate="txtEmail" ErrorMessage="Ingrese un email válido" 
                                     SkinID="RegularExpresionError" 
                                     ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                                 </td><td  style="width:20px"></td><td  style="width:80px"><asp:Label ID="Label16" runat="server" Text="Página Web" SkinID="labelTextSkin"></asp:Label></td><td colspan="4">
                                 <asp:TextBox ID="txtPaginaWeb" runat="server" SkinID="CajaTextoSkin" 
                                                Width="300px" MaxLength="100"></asp:TextBox>
                                 <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                     ControlToValidate="txtPaginaWeb" ErrorMessage="Ingrese una Página Web válida" 
                                     SkinID="RegularExpresionError" 
                                     ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?">*</asp:RegularExpressionValidator>
                                 </td><td></td></tr><tr><td><asp:Label ID="Label17" runat="server" Text="Teléfonos" SkinID="labelTextSkin"></asp:Label></td><td>
                                 <asp:TextBox ID="txtTelefono" runat="server" SkinID="CajaTextoSkin" 
                                                Width="180px" MaxLength="50"></asp:TextBox>
                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                                     ControlToValidate="txtTelefono" 
                                     ErrorMessage="Ingrese el/los números telefónicos" SkinID="RequiredFieldError">*</asp:RequiredFieldValidator>
                                 </td><td></td><td><asp:Label ID="Label18" runat="server" Text="Fax" SkinID="labelTextSkin"></asp:Label></td><td>
                                 <asp:TextBox ID="txtFax" runat="server" SkinID="CajaTextoSkin" MaxLength="20"></asp:TextBox></td><td  style="width:20px"></td><td><asp:Label ID="Label19" runat="server" Text="Autovalúo" SkinID="labelTextSkin" 
                                                Width="50px"></asp:Label></td><td><asp:TextBox ID="txtAutovaluo" runat="server" SkinID="CajaTextoSkin"></asp:TextBox>
                                     <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                                         ControlToValidate="txtAutovaluo" 
                                         ErrorMessage="Ingrese un Monto Válido para el Autovalúo" 
                                         SkinID="RegularExpresionError" 
                                         ValidationExpression="^\d{0,7}(\.\d{1,2})?$">*</asp:RegularExpressionValidator>
                                 </td><td></td></tr><tr><td style="height:5px" colspan="9"></td></tr></table></asp:Panel>
                        <table cellpadding="0" cellspacing="0", border="0" width="100%"><tr><td style="height:10px"></td></tr>
                                                <tr align="center" ><td align="center" style = "width:100%;">
                        <asp:ImageButton ID="imbModificar_DatGen" runat="server" 
                            ImageUrl="~/imagenes/btn_modificar1.png" onclick="imbModificar_DatGen_Click" 
                                                        CausesValidation="False" />
                        &nbsp;<asp:ImageButton ID="imbGuardar_DatGen" runat="server" 
                            ImageUrl="~/imagenes/btn_aceptar1.png" onclick="imbConfirmarGuarcar_Click" />
                        &nbsp;<asp:ImageButton ID="imbCancelar_DatGen1" runat="server" 
                            ImageUrl="~/imagenes/btn_cancelar1.png" OnClick="imbConfirmarCancelar_Click" CausesValidation="False" />
                        </td></tr>
                        <tr align="center" ><td align="center" style = "width:100%;">
                            <asp:ValidationSummary ID="ValSummary01" runat="server" SkinID="ValSummaryError"  />
                            <asp:Label ID="lblMsj" runat="server" SkinID="labelMsjSkin"></asp:Label>
                            <asp:HiddenField ID="hdfNroReg" runat="server" />
                            <asp:HiddenField ID="hdfEstado" runat="server" />
                        </td></tr>
                        </table>

                      </ContentTemplate>
                     </asp:TabPanel>
                    <!-- TAB 2 -->
                    <asp:TabPanel ID="TabRepLegal" runat="server" HeaderText="TabPanel2">
                        <HeaderTemplate>
                            <asp:Label ID="Label20" runat="server" Text="Representante Legal" SkinID="labelTituloTAB" ></asp:Label>
                        </HeaderTemplate>
                        <ContentTemplate>
                            <asp:Label ID="Label28" runat="server" Text="Listado de Representantes" SkinID="labelTituloPANEL"></asp:Label>
                            <asp:Panel ID="Panel7" runat="server" SkinID="panelSkin" >
                                <asp:GridView ID="grvListaRepLegal" runat="server" 
                                            Width="100%" AutoGenerateColumns="False" 
                                            AllowPaging="True" AllowSorting="True" 
                                            SkinID="gridviewSkin" BorderColor="Gray" BorderStyle="Solid" 
                                            BorderWidth="1px" CellPadding="4" ForeColor="#333333" 
                                    GridLines="None" ShowHeaderWhenEmpty="True" CellSpacing="1"> 
                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            <Columns>
                                                <asp:BoundField DataField="crep_Codigo" HeaderText="Código">
                                                <ItemStyle Width="3%" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="cprm_TipRepres" HeaderText="Tipo Rep.">
                                                <ItemStyle Width="8%" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="cprm_TipDocum" HeaderText="Tipo Doc.">
                                                <ItemStyle Width="8%" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="crep_NumDocum" HeaderText="Nro.Doc.">
                                                <ItemStyle Width="8%" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="crep_ApePaterno" HeaderText="Apellido Pat.">
                                                <ItemStyle Width="15%" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="crep_ApeMaterno" HeaderText="Apellido Mat.">
                                                <ItemStyle Width="15%" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="crep_Nombres" HeaderText="Nombres">
                                                <HeaderStyle Width="20%" />
                                                </asp:BoundField>
                                            </Columns>

                                            <EditRowStyle BackColor="#999999" />
                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" 
                                                Height="30px" />
                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                            <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                            <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                            <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                </asp:GridView>
                                </asp:Panel>
                                <asp:Panel ID="Panel8" runat="server" height="5px"></asp:Panel>
                                <!-- Panel Datos Representante -->
                                <asp:Label ID="Label29" runat="server" Text="Datos Representante" SkinID="labelTituloPANEL" Width="150px"></asp:Label>
                                <asp:Panel ID="Panel9" runat="server"  SkinID="panelSkin">
                                    <table border = "0" cellpadding = "2" cellspacing = "2" style="width:100%">
                                        <tr>
                                            <td style="width:5px"></td>
                                            <td style="width:100px">
                                                <asp:Label ID="Label30" runat="server" Text="Tipo Representante" 
                                                    SkinID="labelTextSkin" Width="120px"></asp:Label>
                                            </td>
                                            <td style="width:410px">
                                                <asp:RadioButtonList ID="rblTipRepresen" runat="server" 
                                                    RepeatDirection="Horizontal" SkinID="RadioButtonTextSkin"  Width="400px" 
                                                    Height="30px">
                                                    <asp:ListItem Selected="True">Representante Legal</asp:ListItem>
                                                    <asp:ListItem>Socio</asp:ListItem>
                                                    <asp:ListItem>Representante Legal y Socio</asp:ListItem>
                                                </asp:RadioButtonList>
                                            </td>
                                            <td></td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <asp:Panel ID="Panel10" runat="server" height="5px"></asp:Panel>
                                    <asp:Panel ID="Panel11" runat="server"  SkinID="panelSkin">
                                    <table border = "0" cellpadding = "2" cellspacing = "2" style="width:100%">
                                        <tr>
                                            <td style = "width:5px">                                                
                                            </td>
                                            <td style = "width:80px">
                                                <asp:Label ID="Label31" runat="server" Text="Tipo Documento" SkinID="labelTextSkin"></asp:Label>                        
                                            </td>
                                            <td style = "width:100px">
                                                <asp:DropDownList ID="ddlTipDoc" runat="server" SkinID="DropDownListTextSkin" 
                                                    Width="60px" onselectedindexchanged="ddlTipDoc_SelectedIndexChanged" 
                                                    AutoPostBack="True"></asp:DropDownList>                                            
                                            </td>
                                            <td style = "width:20px">                                                
                                            </td>
                                            <td style = "width:80px">                 
                                                <asp:Label ID="Label32" runat="server" Text="Nro. Documento" SkinID="labelTextSkin"></asp:Label>
                                            </td>
                                            <td >
                                                <asp:TextBox ID="txtNroDoc" runat="server" SkinID="CajaTextoSkin" Width="90px" 
                                                    MaxLength="15"></asp:TextBox>                                                
                                                &nbsp;<asp:ImageButton ID="imbBuscarDNI" runat="server" 
                                                    ImageUrl="~/imagenes/btn_searchweb.png" onclick="imbBuscarDNI_Click" 
                                                    ToolTip="Obtener datos de RENIEC" />
                                            </td>
                                            <td style = "width:20px">                                                
                                            </td>
                                            <td style = "width:60px">
                                                <asp:Label ID="Label33" runat="server" Text="Nro. RUC" SkinID="labelTextSkin"></asp:Label>                                            
                                            </td>
                                            <td style = "width:100px">
                                                <asp:TextBox ID="txtRUCRepLegal" runat="server" SkinID="CajaTextoSkin" 
                                                    Width="90px" MaxLength="12"></asp:TextBox>                                                 
                                            </td>
                                            <td>                                                
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style = "width:5px">                                                
                                            </td>
                                            <td>
                                                <asp:Label ID="Label34" runat="server" Text="Ap. Paterno" SkinID="labelTextSkin"></asp:Label>                        
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtApePat" runat="server" SkinID="CajaTextoSkin" 
                                                    MaxLength="15"></asp:TextBox>                                             
                                            </td>
                                            <td style = "width:20px">                                                
                                            </td>
                                            <td>                 
                                                <asp:Label ID="Label35" runat="server" Text="Ap. Materno" SkinID="labelTextSkin"></asp:Label>
                                            </td>
                                            <td class="style1">
                                                <asp:TextBox ID="txtApeMat" runat="server" SkinID="CajaTextoSkin" 
                                                    MaxLength="15"></asp:TextBox>                                                
                                            </td>
                                            <td style = "width:20px">                                                
                                            </td>
                                            <td>
                                                <asp:Label ID="Label36" runat="server" Text="Nombres" SkinID="labelTextSkin"></asp:Label>                                            
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtNombres" runat="server" SkinID="CajaTextoSkin" 
                                                    Width="120px" MaxLength="25"></asp:TextBox>                                                 
                                            </td>
                                            <td>                                                
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                                <asp:Panel ID="Panel12" runat="server" height="5px"></asp:Panel>
                                <table cellpadding="0" cellspacing="0", border="0" width="100%">
                                    <tr><td style="height:10px"></td>
                                    </tr>
                                    <tr align="center" ><td align="center" style = "width:100%;">
                                        <asp:ImageButton ID="imbNuevo_RepLeg" runat="server" 
                                            ImageUrl="~/imagenes/btn_nuevo1.png" CausesValidation="False" Width="120px" 
                                            onclick="imbNuevo_RepLeg_Click" />
                                        &nbsp;<asp:ImageButton ID="imbModificar_RepLeg" runat="server" 
                                            ImageUrl="~/imagenes/btn_modificar1.png" CausesValidation="False" />
                                        &nbsp;<asp:ImageButton ID="imbGuardar_RepLeg" runat="server" 
                                            ImageUrl="~/imagenes/btn_aceptar1.png" 
                                            onclick="imbConfirmarGuarcar_Click" />
                                        &nbsp;<asp:ImageButton ID="imbCancelar_RepLeg" runat="server" 
                                            ImageUrl="~/imagenes/btn_cancelar1.png" CausesValidation="False" 
                                            onclick="imbConfirmarCancelar_Click"  />
                                </td></tr>
                                <tr align="center" ><td align="center" style = "width:100%;">
                                    <asp:ValidationSummary ID="ValSummaryRepLeg" runat="server" SkinID="ValSummaryError"  />
                                    <asp:Label ID="lblMsjRepLegal" runat="server" SkinID="labelMsjSkin"></asp:Label>
                                    <asp:HiddenField ID="hdfCodRepresentante" runat="server" />
                                </td></tr>
                                </table>

                        </ContentTemplate>
                    </asp:TabPanel>
                    <!-- Tab 3 -->
                    <asp:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3"><HeaderTemplate><asp:Label ID="Label21" runat="server" Text="Experiencia" SkinID="labelTituloTAB" ></asp:Label></HeaderTemplate>
                        <ContentTemplate>
                            <asp:Label ID="Label60" runat="server" Text="Listado de Experiencias" SkinID="labelTituloPANEL"></asp:Label>
                            <asp:Panel ID="Panel30" runat="server" SkinID="panelSkin" >
                                <asp:GridView ID="grvListaExp" runat="server" 
                                            Width="100%" AutoGenerateColumns="False" 
                                            AllowPaging="True" AllowSorting="True" 
                                            SkinID="gridviewSkin" BorderColor="Gray" BorderStyle="Solid" 
                                            BorderWidth="1px" CellPadding="4" ForeColor="#333333" 
                                    GridLines="None" ShowHeaderWhenEmpty="True" CellSpacing="1"> 
                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                            <Columns>
                                                <asp:BoundField DataField="cexp_Codigo" HeaderText="Código">
                                                <ItemStyle Width="3%" />
                                                </asp:BoundField>
                                                <asp:BoundField HeaderText="Sector">
                                                <ItemStyle Width="8%" />
                                                </asp:BoundField>
                                                <asp:BoundField HeaderText="Nombre Entidad">
                                                <ItemStyle Width="15%" />
                                                </asp:BoundField>
                                                <asp:BoundField HeaderText="Tipo Auditoría">
                                                <ItemStyle Width="8%" />
                                                </asp:BoundField>
                                                <asp:BoundField HeaderText="F.I. Alcance">
                                                <ItemStyle Width="6%" />
                                                </asp:BoundField>
                                                <asp:BoundField HeaderText="F.F. Alcance">
                                                <ItemStyle Width="6%" />
                                                </asp:BoundField>
                                                <asp:BoundField HeaderText="Dias Eje.">
                                                <HeaderStyle Width="6%" />
                                                </asp:BoundField>
                                                <asp:BoundField HeaderText="T. HH" >
                                                <HeaderStyle Width="6%" />
                                                </asp:BoundField>
                                            </Columns>

                                            <EditRowStyle BackColor="#999999" />
                                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" 
                                                Height="30px" />
                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                            <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                            <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                            <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                </asp:GridView>
                                </asp:Panel>
                                <asp:Panel ID="Panel13" runat="server" height="5px"></asp:Panel>
                                <!-- Panel Datos Experiencia -->
                                <asp:Label ID="Label37" runat="server" Text="Datos de Experiencia" SkinID="labelTituloPANEL" Width="150px"></asp:Label>
                                <asp:Panel ID="Panel14" runat="server"  SkinID="panelSkin">
                                    <table border = "0" cellpadding = "2" cellspacing = "2" style="width:100%">
                                        <tr>
                                            <td style="width:5px"></td>
                                            <td width="80px"><asp:Label ID="Label38" runat="server" Text="Sector" SkinID="labelTextSkin"></asp:Label></td>
                                            <td><asp:DropDownList ID="ddlSector" runat="server" 
                                                    SkinID="DropDownListTextSkin" Width="120px"></asp:DropDownList></td>
                                            <td width="30"></td>
                                            <td><asp:Label ID="Label39" runat="server" Text="Convenio" SkinID="labelTextSkin"></asp:Label></td>
                                            <td><asp:DropDownList ID="ddlConvenio" runat="server" 
                                                    SkinID="DropDownListTextSkin" Width="70px"></asp:DropDownList></td>
                                            <td width="30"></td>
                                            <td><asp:Label ID="Label40" runat="server" Text="Nro Convenio" SkinID="labelTextSkin"></asp:Label></td>
                                            <td><asp:TextBox ID="txtNroConvenio" runat="server" SkinID="CajaTextoSkin" 
                                                    Width="70px"></asp:TextBox></td>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td style="width:5px"></td>
                                            <td><asp:Label ID="Label41" runat="server" Text="Entidad" SkinID="labelTextSkin"></asp:Label></td>
                                            <td colspan="4"><asp:TextBox ID="txtEntidad" runat="server" SkinID="CajaTextoSkin" Width="300px"></asp:TextBox><asp:ImageButton
                                                    ID="imbBuscar_Entidad" runat="server" Height="25px" 
                                                    ImageUrl="~/imagenes/btn_buscar0.png" onclick="imbBuscar_Entidad_Click" 
                                                    ToolTip="Buscar Entidad" /></td>
                                            <td></td>
                                            <td><asp:Label ID="Label43" runat="server" Text="RUC Entidad" SkinID="labelTextSkin"></asp:Label></td>
                                            <td><asp:TextBox ID="txtRUCEntidad" runat="server" SkinID="CajaTextoSkin"></asp:TextBox></td>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td style="width:5px"></td>
                                            <td><asp:Label ID="Label42" runat="server" Text="Sección" SkinID="labelTextSkin"></asp:Label></td>
                                            <td colspan="4"><asp:DropDownList ID="ddlSeccion" runat="server" 
                                                    SkinID="DropDownListTextSkin" Width="300px"></asp:DropDownList></td>
                                            <td></td>
                                            <td><asp:Label ID="Label44" runat="server" Text="Tipo Auditoría" SkinID="labelTextSkin"></asp:Label></td>
                                            <td><asp:DropDownList ID="ddlTipAud" runat="server" 
                                                    SkinID="DropDownListTextSkin" Width="100px"></asp:DropDownList></td>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td style="width:5px"></td>
                                            <td><asp:Label ID="Label47" runat="server" Text="F.I. Alcance" SkinID="labelTextSkin"></asp:Label></td>
                                            <td><asp:TextBox ID="txtFIAlcance" runat="server" SkinID="CajaTextoSkin" Width="70px"></asp:TextBox></td>
                                            <td></td>
                                            <td><asp:Label ID="Label48" runat="server" Text="F.F.Alcance" SkinID="labelTextSkin"></asp:Label></td>
                                            <td><asp:TextBox ID="txtFFAlcance" runat="server" SkinID="CajaTextoSkin" Width="70px"></asp:TextBox></td>
                                            <td></td>
                                            <td><asp:Label ID="Label49" runat="server" Text="F. Dictamen" SkinID="labelTextSkin"></asp:Label></td>
                                            <td><asp:TextBox ID="txtFecDictamen" runat="server" SkinID="CajaTextoSkin" Width="70px"></asp:TextBox></td>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td style="width:5px"></td>
                                            <td><asp:Label ID="Label50" runat="server" Text="F.I. Ejecución" SkinID="labelTextSkin"></asp:Label></td>
                                            <td><asp:TextBox ID="txtFIEjecucion" runat="server" SkinID="CajaTextoSkin" Width="70px"></asp:TextBox></td>
                                            <td></td>
                                            <td><asp:Label ID="Label51" runat="server" Text="F.F.Ejecución" SkinID="labelTextSkin"></asp:Label></td>
                                            <td><asp:TextBox ID="txtFFEjecucion" runat="server" SkinID="CajaTextoSkin" Width="70px"></asp:TextBox></td>
                                            <td></td>
                                            <td><asp:Label ID="Label52" runat="server" Text="HH" SkinID="labelTextSkin"></asp:Label></td>
                                            <td><asp:TextBox ID="txtHH" runat="server" SkinID="CajaTextoSkin" Width="70px"></asp:TextBox></td>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td style="width:5px"></td>
                                            <td colspan="2"><asp:Label ID="Label53" runat="server" Text="Retribución Económica" SkinID="labelTextSkin"></asp:Label>
                                                <asp:DropDownList ID="ddlTipMonRetribucion" runat="server" 
                                                    SkinID="DropDownListTextSkin">
                                                <asp:ListItem>S/.</asp:ListItem>
                                                <asp:ListItem>US$</asp:ListItem>
                                                </asp:DropDownList>
                                                <asp:TextBox ID="txtMonRetribucion" runat="server" SkinID="CajaTextoSkin" Width="70px"></asp:TextBox>
                                            </td>
                                            <td>
                                            </td>
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                        </tr>
                                    </table>                                    
                                </asp:Panel>
                                <asp:Panel ID="Panel15" runat="server" height="5px"></asp:Panel>
                                <table cellpadding="0" cellspacing="0", border="0" width="100%">
                                    <tr><td style="height:10px"></td>
                                    </tr>
                                    <tr align="center" ><td align="center" style = "width:100%;">
                                        <asp:ImageButton ID="imbNuevo_Exp" runat="server" 
                                            ImageUrl="~/imagenes/btn_nuevo1.png" CausesValidation="False" Width="120px" 
                                             />
                                        &nbsp;<asp:ImageButton ID="imbModificar_Exp" runat="server" 
                                            ImageUrl="~/imagenes/btn_modificar1.png" CausesValidation="False" />
                                        &nbsp;<asp:ImageButton ID="imbGuardar_Exp" runat="server" 
                                            ImageUrl="~/imagenes/btn_aceptar1.png" 
                                            />
                                        &nbsp;<asp:ImageButton ID="imbCancelar_Exp" runat="server" 
                                            ImageUrl="~/imagenes/btn_cancelar1.png" CausesValidation="False" 
                                             />
                                </td></tr>
                                <tr align="center" ><td align="center" style = "width:100%;">
                                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" SkinID="ValSummaryError"  />
                                    <asp:Label ID="Label45" runat="server" SkinID="labelMsjSkin"></asp:Label>
                                    <asp:HiddenField ID="HiddenField1" runat="server" />
                                </td></tr>
                                </table>
                        </ContentTemplate>
                    </asp:TabPanel>
                    <asp:TabPanel ID="TabPanel4" runat="server" HeaderText="TabPanel3"><HeaderTemplate><asp:Label ID="Label22" runat="server" Text="Personal" SkinID="labelTituloTAB" ></asp:Label></HeaderTemplate></asp:TabPanel>
                    <asp:TabPanel ID="TabPanel5" runat="server" HeaderText="TabPanel3"><HeaderTemplate><asp:Label ID="Label23" runat="server" Text="Documentos Adjuntos" SkinID="labelTituloTAB" ></asp:Label></HeaderTemplate></asp:TabPanel>
                </asp:TabContainer>
                
            </td>
        </tr>
    </table>


    <table border = "0" cellpadding = "0" cellspacing = "0" style="width:100%">
        <tr>
            <td style="height:10px"><hr id="separador1" /></td>
        </tr>
        <tr>
            <td>
                &nbsp;<asp:ImageButton ID="imb_Enviar" runat="server" 
                    ImageUrl="~/imagenes/btn_enviar1.png" 
                    ToolTip="Enviar legajo para evaluación" onclick="imb_Enviar_Click" />
                &nbsp;<asp:ImageButton ID="imb_Cerrar" runat="server" 
                    ImageUrl="~/imagenes/btn_cerrar1.png" onclick="imb_Cerrar_Click" 
                    ToolTip="Cerrar Legajo" />
            </td>
        </tr>
    </table>

</div>

    </ContentTemplate>
</asp:UpdatePanel>

<!-- ConfirmMsjGuardar -->
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:Panel ID="msgMain2" runat="server" style="display:none; border-style:solid; border-color:Green; background-color:White; padding:15px;" Width="300px"  >
            <div style="text-align:center; ">
                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr><td style="height:15px"></td></tr>
                    <tr>
                        <td style="width:50px; text-align:center;">
                            <asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="~/imagenes/btn_question.png" />
                        </td>                                            
                        <td>
                            <asp:Label ID="lblMsjConfirm2" runat="server" Text="¿Seguro ...?" 
                                ForeColor="Black" /><br />
                        </td>
                    </tr>
                    <tr><td  style="height:20px"></td></tr>
                    <tr>
                        <td colspan="2">
                            <asp:ImageButton ID="imbOK2" runat="server"  OnClick="imbOK2_Click" ImageUrl="~/imagenes/btn_msjaceptar.png" />&nbsp;&nbsp;
                            <asp:ImageButton ID="imbCancel2" runat="server" ImageUrl="~/imagenes/btn_msjcancelar.png" />
                        </td>
                    </tr>
                    <tr>
                        <td  style="height:15px"></td>
                    </tr>
                </table>
            </div>
        </asp:Panel>
        <asp:HiddenField ID="hdfModalConfirm" runat="server"  />
        <asp:ModalPopupExtender ID="modalPopup2" runat="server" PopupControlID="msgMain2" 
                                TargetControlID="hdfModalConfirm" 
                                CancelControlID="imbCancel2" 
                                BackgroundCssClass="backgroundPopup" 
        DynamicServicePath="" Enabled="True">
        </asp:ModalPopupExtender>
    </ContentTemplate>
</asp:UpdatePanel>
<!-- ConfirmMsjCancelar -->
<asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:Panel ID="msgMain3" runat="server" style="display:none; border-style:solid; border-color:Green; background-color:White;  padding:15px;" Width="300px" >
            <div style="text-align:center; ">
                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr><td style="height:15px"></td></tr>
                    <tr>
                        <td style="width:50px; text-align:center;">
                            <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/imagenes/btn_question.png" />
                        </td>
                        <td>                            
                            <asp:Label ID="lblMsjConfirm3" runat="server" 
                                Text="¿Seguro de cancelar y perder los datos?" ForeColor="Black" /><br />
                        </td>
                    </tr>
                    <tr><td  style="height:20px"></td></tr>
                    <tr>
                        <td colspan="2">
                            <asp:ImageButton ID="imbOK3" runat="server"  OnClick="imbOK3_Click" ImageUrl="~/imagenes/btn_msjaceptar.png" />&nbsp;&nbsp;
                            <asp:ImageButton ID="imbCancel3" runat="server" ImageUrl="~/imagenes/btn_msjcancelar.png" />
                        </td>
                    </tr>
                    <tr>
                        <td  style="height:15px"></td>
                    </tr>
                </table>
            </div>
        </asp:Panel>
        <asp:HiddenField ID="hdfModalConfirmCancel" runat="server" />
        <asp:ModalPopupExtender ID="modalPopup3" runat="server" PopupControlID="msgMain3" 
                                TargetControlID="hdfModalConfirmCancel" 
                                CancelControlID="imbCancel3" 
                                BackgroundCssClass="backgroundPopup" 
        DynamicServicePath="" Enabled="True">
        </asp:ModalPopupExtender>
    </ContentTemplate>
</asp:UpdatePanel>

<!-- ConfirmMsjEnviar -->
<asp:UpdatePanel ID="UpdatePanel5" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:Panel ID="msgMain5" runat="server" style="display:none; border-style:solid; border-color:Green; background-color:White; padding:15px;" Width="300px"  >
            <div style="text-align:center; ">
                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr><td style="height:15px"></td></tr>
                    <tr>
                        <td style="width:50px; text-align:center;">
                            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/imagenes/btn_question.png" />
                        </td>                                            
                        <td>
                            <asp:Label ID="lblMsjConfirm5" runat="server" Text="¿Seguro de enviar el documento?" 
                                ForeColor="Black" /><br />
                        </td>
                    </tr>
                    <tr><td  style="height:20px"></td></tr>
                    <tr>
                        <td colspan="2">
                            <asp:ImageButton ID="imbOK5" runat="server"  OnClick="imbOK5_Click" ImageUrl="~/imagenes/btn_msjaceptar.png" />&nbsp;&nbsp;
                            <asp:ImageButton ID="imbCancel5" runat="server" ImageUrl="~/imagenes/btn_msjcancelar.png" />
                        </td>
                    </tr>
                    <tr>
                        <td  style="height:15px"></td>
                    </tr>
                </table>
            </div>
        </asp:Panel>
        <asp:HiddenField ID="hdfModalConfirm5" runat="server"  />
        <asp:ModalPopupExtender ID="modalPopupEnviar" runat="server" PopupControlID="msgMain5" 
                                TargetControlID="hdfModalConfirm5" 
                                CancelControlID="imbCancel5" 
                                BackgroundCssClass="backgroundPopup" 
        DynamicServicePath="" Enabled="True">
        </asp:ModalPopupExtender>
    </ContentTemplate>
</asp:UpdatePanel>

</asp:Content>

